<%-- 
    Document   : SearchPriceTour
    Created on : Nov 2, 2011, 12:21:03 AM
    Author     : MrKoi
--%>

<%@page import="DAL.TourPackageBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib uri="/WEB-INF/taglib139.tld" prefix="pg" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
        <style type="text/css">
          
            
        </style>
        <style type="text/css">
            a:link {
            text-decoration: none;
            }
            a:visited {
            text-decoration: none;
            }
            a:hover {
            text-decoration: underline;
            }
            a:active {
            text-decoration: none;
            }
        </style>
    </head>
    <body>
        <form action="ControSearchPriceTour" method="post" id="searchpricetour">
            <center>
            <table>
                <tr>
                    <td colspan="2" height="30px;"></td>
                </tr>
                <tr>
                    <td colspan="2" align="center" style="color:#0000CC;"><h3> Search by Price Tour</h3>
                        
                    </td>
                </tr>
                <tr>
                    <td>Enter price tour</td>
                    <td><input id="pricetour" name="pricetour" value=""/></td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" value="Search"/>
                    </td>
                </tr>
            </table>
            </center>
        </form> 
        
        <%
        String priceTour="";
        if(session.getAttribute("priceTour")!=null) {
           priceTour=session.getAttribute("priceTour").toString();
                
            TourPackageBean tuorPack=new TourPackageBean();
            Collection coll=tuorPack.SearchTourByPrice(priceTour);
            request.setAttribute("priceTour",coll);
        }
        %>
        <center>
            <table width="640px" style="border:1px solid #ccc;background-color:#eee;">
                <tr height="20px">
                    <td height="20px" valign="top"> 
                        <div class="backTitGreen" style="background:url(skinImgTuor/backTitGreenL.png) repeat-y;clear:both;width:640px;">             
                            <img src="skinImgTuor/startW.png" height="20px"/>                        
                        </div>
                    </td>
                </tr>
                <pg:paging pageSize="5" url="index.jsp?page=SearchPriceTour">     
                    
                    <c:forEach items="${priceTour}" var="tp">  
                        <pg:item>
                            <tr>
                                <td align="left">
                                    <table width="100%" border="0" align="left" style=" border: 1px solid #ccc;">
                                        <tr>
                                            <td width="110px" height="97px" valign="top">
                                                <img src="${tp.image}" width="110px" height="97px" title="" align="left" style="border: 1px solid #ccc;"/>
                                                
                                            </td>
                                            <td valign="top">
                                                <p style="text-align:left;font-size:12px;font-family:Arial, Helvetica, sans-serif;">
                                                    <a href="ControllerViewTour?tourID=${tp.tourID}">
                                                        <strong style="color:#0000CC;">${tp.tourName}</strong>
                                                    </a>	
                                                    
                                                    <br>
                                                    ${tp.state}
                                                </p>                                
                                                
                                                <table border="0" align="right" cellpadding="0" width="100%">
                                                    <tr>
                                                        <td align="right" valign="top" width="85%">                                                     
                                                            <a href='ControllerViewTour?tourID=${tp.tourID}' style="font-size:12px;">View more</a>
                                                        </td>
                                                        <td valign="top" width="15%"> 
                                                            <form action="index.jsp?page=BookTour" method="post" name="bookt">
                                                                <input type="hidden" name="idTour" value="${tp.tourID}"/>
                                                                <input type="hidden" name="name" value="${tp.tourName}"/>
                                                                <input type="hidden" name="ap" value="${tp.adultPrice}"/>
                                                                <input type="hidden" name="cp" value="${tp.childPrice}"/>                                                  
                                                                <input type="submit" name="Submit" value="Book here" style="border:none;width:70px;heighht:16px;padding-bottom:2px;font-weight:bold;text-align:center;margin:0px 10px;font-size:10px;background-image:url(skinImgTuor/btnSmall.jpg);color: #fff;"/>
                                                            </form>
                                                        </td>
                                                    </tr>
                                                </table>                                           
                                                
                                            </td>
                                        </tr>
                                    </table>
                                    
                                </td>
                            </tr>
                        </pg:item>       
                    </c:forEach>
                    <pg:index>
                        <pg:page><%=thisPage%></pg:page>
                    </pg:index>
                </pg:paging> 
            </table>    
        </center>
    </body>
</html>
